﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Liber;
using Liber.Event;
using Liber.SOA;

namespace SoBusiness.App
{
    public class SoFinderApp:SOAUnit
    {
        public SoFinderApp(SOAHost _host) : base(_host)
        {

        }

        [API("FindObj")]
        FnResult<DyObject> Find(SOARequestContext rq)
        {
            long uid = rq.RequestContext.GetOrDefault<long>("uid", -1);
            string key = rq.RequestContext.GetOrDefault<string>("key", "");

            var ee = EventBUS.SysEvent(Name, uid, "", "Search", key);
            ee.End();

            return FnResult<DyObject>.Sucess(new DyObject());
        }
    }
}
